package reduce.fz.com.reduce.util;

import android.content.Context;

import reduce.fz.com.reduce.service.FindService;
import reduce.fz.com.reduce.service.StoryService;
import reduce.fz.com.reduce.service.TeamService;
import reduce.fz.com.reduce.service.UserService;

/**
 * Created by qingshengzheng on 15/7/26.
 */
public class ServiceBuilder {
    private static FindService findService;
    private static UserService userService;
    private static StoryService storyService;
    private static TeamService teamService;

    public static FindService builderFindService(Context context) {
        if (findService == null)
            findService = new FindService(context);
        return findService;
    }

    public static UserService builderUserService(Context context) {
        if (userService == null)
            userService = new UserService(context);
        return userService;
    }

    public static StoryService builderStoryService(Context context) {
        if (storyService == null)
            storyService = new StoryService(context);
        return storyService;
    }

    public static TeamService builderTeamService(Context context) {
        if (teamService == null)
            teamService = new TeamService(context);
        return teamService;
    }
}
